<?php
include "./base.php";
$name = $_POST["name"];
$rid = $_POST["text"];
$room = $_POST["text1"];
$bed = $_POST["text2"];
$major = $_POST["text3"];
$clazz = $_POST["text4"];
$gender = $_POST["gender"];
$studentnum = $_POST["studentnum"];
$phone = $_POST["phone"];
$telphone = $_POST["telphone"];
$sql = "insert into apply value(null,'$name ','$rid','$room','$bed','$major','$clazz','$gender','$studentnum','$phone','$telphone')";
mysql_query($sql);
$res = mysql_query($sql);
$row = mysql_fetch_assoc($res);
print_r(json_encode($row));
?>